const { validIncorrectParameter } = require('@utils/tools');

const { cartaddrUpdateSchema, cartBulkValidSchema } = require('./cart.schema');

module.exports = {
  async validator(ctx, next) {
    const valid = validIncorrectParameter(cartaddrUpdateSchema, ctx);

    !valid && (await next());
  },

  async validatorById(ctx, next) {
    const valid = validIncorrectParameter(cartBulkValidSchema, ctx);

    !valid && (await next());
  },
};
